Skip to content

fix(agc): save the guest bytes of results that become pending over a surface that is no longer fully write-watched (upstream #7048) - #48

Open
AlxcBTW wants to merge 1 commit into
mainfrom
fix/agc-pending-save-7048
Open

AlxcBTW wants to merge 1 commit into
mainfrom
fix/agc-pending-save-7048

Conversation

@AlxcBTW

@AlxcBTW AlxcBTW commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

What

Carries boykopovar#7048 onto our main before upstream merges it: boykopovar#7048

Our Minecraft run on 28.10. ended while loading a world with AGC graphics: storing storage image results pending over memory outside the write watch without the guest bytes saved before them is not implemented (STATUS_FAIL_FAST 0xC0000409). This is that path.

One squashed commit of the final diff of boykopovar#7048 (head 730c721, which is boykopovar#7048's own commits, the unwatch baseline hash of boykopovar#10026 that the upstream maintainers asked to land together with it, and a merge of upstream main), applied onto our main without the upstream merge history:

  • a unit that becomes pending over a surface that is not fully write-watched takes its guest bytes, whatever its generation; blocks written by the CPU since the generation keep their bytes
  • the write-back retiles into the unit shadow only over a wholly watched span
  • a pending result over an unwatched unit is stored only while the unit's bytes still equal the upload (surfaces up to 1 MiB) or the hash taken when its range left the watch (larger surfaces); otherwise the old refusal stays, so it fails closed
  • no hash on the upload path (the slowdown upstream measured on Astro Bot and The Pathless came from there)
  • test agc_storage_pending_after_unwatch and the unwatch-hook tests

Overlap with #47 (upstream sync): #47 touches Texture.cpp, Recorder.cpp, GuestMemory.cpp and libSceAgcDriver/CMakeLists.txt as well. This PR applies cleanly on current main; whichever lands second resolves the conflict, and the merged result of both is what upstream's boykopovar#7048 head already contains (merge with upstream main f8f5b24 was conflict free).

Engine owners review; I do not merge this.

Tested

  • Not built locally (CI only). Upstream's head 730c721 merged upstream main f8f5b24 without textual conflicts; tools/check_conventions.py --base origin/main passes on this branch.
  • Fork CI on this PR: Windows job (full build, all registered ctest tests) passed, https://github.com/anyplaynet/AnyPS5/actions/runs/40720659323 . Linux was dispatched (run 40721234650) and was still queued when this was written.

Checklist

…surface that is no longer fully write-watched

Carries boykopovar#7048 onto the fork main as one commit: the guest bytes of a unit are saved when it becomes pending over a surface that is not fully write-watched, large surfaces get a baseline hash taken when their range leaves the watch, and the new tests cover both.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant